﻿package Classes.Explode{
	import flash.display.Sprite;
	import flash.utils.Timer;
	import flash.events.TimerEvent;
	import flash.events.Event;
	import Classes.Elements.Element;
	import Classes.*;

	public class Explode extends BasicElement{
		static public const BULLET:int = 1;
		static public const UNIT:int = 2;
		static public const BURST:int = 3;
		static public const BOSS:int = 4;
		
		private var timer:Timer;
		public var period:int = 500;
		public function Explode(){
		}
		public function explode():void{
			timer = new Timer(period,1);
			timer.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerComplete);
			timer.start();
			this.erasable = false;			
		}

		protected function onTimerComplete(e:TimerEvent):void{
			timer.removeEventListener(TimerEvent.TIMER_COMPLETE,onTimerComplete);
			this.erasable = true;
		}
	}
}